package Problems;

/**
 * @author 35192
 * @date 2022-01-28 18:46
 */
public class p1 {

    public static void main(String[] args) {

        int cnt = 0;
        for (int i = 1; i <= 3; i++) {
            System.out.println("*****第"+i+"次*****");
            if (gcd(i, 2021) > 1){
                cnt++;
                System.out.println("符合条件，cnt值为："+cnt);
            } else {
                System.out.println("不符合条件！");
            }
        }

    }
    static int gcd(int a, int b) {
        int b1 = b > 0 ? gcd(b, a % b) : a;
        System.out.println(b1);
        return b1;
    }
}